<?php

    // +----------------------------------------------------------------------
    // | 短息记录
    // +----------------------------------------------------------------------
    // | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
    // +----------------------------------------------------------------------
    // | Author: 微尘 <yicmf@qq.com>
    // +----------------------------------------------------------------------

    namespace app\controller\ucenter\admin;

	use app\controller\admin\Common;
    use yicmf\builder\Table;
    use app\model\ucenter\Sms as SmsModel;

    class  Sms extends Common
    {
        protected function initialize()
        {
            parent::initialize();
        }


        public function _filter()
        {
            $map = [];
            $map[] = ['status', '>', -2];
            return $map;
        }

        public function index()
        {
            // 显示页面
            $builder = new Table();
            $builder->model(SmsModel::class)
                ->where($this->_filter())
                ->order('id DESC')
                ->searchTextLike('mobile', '手机号')
                ->keyId()
                ->keyText('mobile', '手机')
                ->keyText('{$data.data|json_encode}', '参数')
                ->keyText('type', '发送类型')
                ->keyText('out_id', '外部id')
                ->keyText('channel', '发送渠道')
                ->keyText('result_message', '结果')
                ->keyIp()
				->keyTime('send_time','发送时间')
                ->keyCreateTime();
            return $builder->fetch();
        }
    }
